listen
Listens to a specific PostgreSQL channel and processes notifications using the provided callback function.
This method leverages the PostgreSQL listen/notify mechanism to receive notifications on the specified channel. It delegates the listening task to the listen
method that supports multiple channels.
Parameters
The name of the PostgreSQL channel to listen to. This represents a single PostgreSQL listen/notify channel.
A callback function that is invoked for each notification received. The function accepts a Notification
object containing the channel name and the notification payload.
Listens to notifications on the specified PostgreSQL channels and processes them using the provided callback function. The notifications are received via the PostgreSQL listen/notify mechanism.
Parameters
A list of channel names to listen to. The list must not be empty. Each channel represents a PostgreSQL listen/notify channel.
A callback function that is invoked for each notification received. The function accepts a Notification
object containing the channel name and the notification payload.
Throws
If the channels
list is empty.